<?php
$this->load->view('layout/header', ["title"=> "接口调试首页"]);
$this->load->view('layout/topnav');

?>
<div style="margin:auto 0px; margin-top:10px; width:1000px;"></div>

<?php
foreach($treeData as $apigroup){
?>
<table align="center" width="1000" cellpadding="0" cellspacing="1" style="border:1px solid #CCC">
  <tr bgcolor="#EEE" height="24">
    <td colspan="4"><?php echo $apigroup["name"]?></td>
  </tr>
<?php

  foreach($apigroup["children"] as $api){
      $link = isset($api["link"]) && !empty($api["link"]) ? $api["link"].'?apiid='.$api["id"] : "/search/detail.html?uri=".$api["uri"];
      $uri = $host;
      $method = isset($api["method"])  ? $api["method"] : "GET";
      $isAuth = (isset($api["isAuth"]) && $api["isAuth"]) ? "AUTH" : "否";

?>
  <tr bgcolor="#F9F9F9" height="24">
    <td width="260"><a href="<?php echo $link?>" target="_blank"><?php echo $api["name"]?></a></td>
    <td><?php echo $uri?><?php echo $api["uri"]?></a></td>
    <td><?php echo $method?></td>
    <td><?php echo $isAuth?></td>
  </tr>
<?php
  }
?>
</table>
<br>
<?php	
}

?>

</body>
</html>